package controllers

import (
	"quickstart/models"

	"github.com/astaxie/beego"
)

type MainController struct {
	beego.Controller
}

func (c *MainController) Get() {
	c.Data["Website"] = "beego.me"
	c.Data["Email"] = "astaxie@gmail.com"

	user := models.GetAdminUserById(1)

	// 然后将user数据保存到Data中, 将参数传给后面的views视图模板处理
	c.Data["user"] = user

	c.TplName = "login.html"
}
